use serde::{Serialize, Deserialize};


/// 日报的表单
///
/// * api:https://api.uyiban.com/workFlow/c/my/form/:taskid
/// * query:**CSRF**
#[derive(Debug, Serialize, Deserialize)]
pub struct DailyForm {
    #[serde(rename = "Id")]
    pub id: String,

    #[serde(rename = "WFName")]
    pub wf_name: String,

    #[serde(rename = "Form")]
    pub form: Vec<Form>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Form {
    #[serde(rename = "component")]
    pub component: String,

    #[serde(rename = "props")]
    pub props: Props,

    #[serde(rename = "id")]
    pub id: String,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Props {
    #[serde(rename = "text")]
    pub text: Option<String>,

    #[serde(rename = "label")]
    pub label: Option<String>,

    #[serde(rename = "options")]
    pub options: Option<Vec<String>>,

    #[serde(rename = "required")]
    pub required: Option<bool>,

    #[serde(rename = "placeholder")]
    pub placeholder: Option<String>,

    #[serde(rename = "params")]
    pub params: Option<Params>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Params {
    #[serde(rename = "keywords")]
    pub keywords: String,

    #[serde(rename = "zoom")]
    pub zoom: i64,

    #[serde(rename = "radius")]
    pub radius: i64,

    #[serde(rename = "total")]
    pub total: i64,
}
